﻿#region  文件信息
// ---------------------------------------------------------------------------------------
// <copyright file="SubTestUser.cs" company="">
// 作者：李帅伦
// </copyright>
// <summary>
// 类型简介：
// 类型详细：SubTestUser.cs
// 创建时间：2015-03-27 0:15
// 修改时间：2015-03-27 0:15
// </summary>
// ---------------------------------------------------------------------------------------
#endregion

using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using AmazeUI.Imodel;

namespace Ema.Models.XtModel
{
    /// <summary>
    /// The sub test user.
    /// </summary>
    public class SubXtUser : IXtUser
    {
        [StringLength(6, ErrorMessage = "最多只能{1}个字")]
        [Required]
        [DisplayName("姓名")]
        public string Name { get; set; }

        /// <summary>
        /// 邮箱地址
        /// </summary>
        //[Required(ErrorMessage = "请输入邮箱地址")]
        [RegularExpression(@"\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*", ErrorMessage = "请输入正确的邮箱地址")]
        public string Email { get; set; }

        /// <summary>
        /// Gets or sets the password.
        /// </summary>
        [StringLength(18, ErrorMessage = "最多只能{1}个字")]
        [Required]
        [DisplayName("密码")]
        public string Pwd { get; set; }


        public string UsingIp { get; set; }

        public string Rmark { get; set; }
        public string ImgUrl { get; set; }
        public bool IsUsing { get; set; }
        public int AreaId { get; set; }

        /// <summary>
        /// 是
        /// </summary>
        [Required]
        [DisplayName("角色")]
        public int RoleId { get; set; }

        /// <summary>
        /// Gets or sets the id.
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        [StringLength(12, ErrorMessage = "最多只能{1}个字")]
        [Required]
        [DisplayName("账号")]
        public string UserName { get; set; }

        /// <summary>
        /// 电话
        /// </summary>

        [DisplayName("手机电话")]
        [RegularExpression(@"1[3-9]\d-\d{4}-\d{4}", ErrorMessage = "手机号错误")]
        public string Phone { get; set; }

    }
}